// PrPageOutput.cpp : implementation file
//

#include "stdafx.h"
#include "ansieditor.h"
#include "PrPageOutput.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPrPageOutput dialog


CPrPageOutput::CPrPageOutput(CWnd* pParent /*=NULL*/)
	: CPrPage(CPrPageOutput::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPrPageOutput)
	m_nEscType = -1;
	m_bConvertReverse = FALSE;
	m_bOutputLightEsc = FALSE;
	m_bCrossLineEsc = FALSE;
	//}}AFX_DATA_INIT
}


void CPrPageOutput::DoDataExchange(CDataExchange* pDX)
{
	CPrPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPrPageOutput)
	DDX_Radio(pDX, IDC_OPT_ESCTYPE, m_nEscType);
	DDX_Check(pDX, IDC_CHK_CONVERT_REVERSE, m_bConvertReverse);
	DDX_Check(pDX, IDC_CHK_OUTPUT_LIGHTESC, m_bOutputLightEsc);
	DDX_Check(pDX, IDC_CHK_CROSSLINEESC, m_bCrossLineEsc);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPrPageOutput, CPrPage)
	//{{AFX_MSG_MAP(CPrPageOutput)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPrPageOutput message handlers

BOOL CPrPageOutput::OnInitDialog() 
{
	m_nEscType = gpApp->m_options.nEscType;
	m_bConvertReverse = gpApp->m_options.bConvertReverse;
	m_bOutputLightEsc = gpApp->m_options.bOutputLightEsc;
	m_bCrossLineEsc = gpApp->m_options.bCrossLineEsc;
	CPrPage::OnInitDialog();
	
	return TRUE;
}

BOOL CPrPageOutput::ValidateData()
{
	UpdateData();
	gpApp->m_options.nEscType = m_nEscType;
	gpApp->m_options.bConvertReverse = m_bConvertReverse;
	gpApp->m_options.bOutputLightEsc = m_bOutputLightEsc;
	gpApp->m_options.bCrossLineEsc = m_bCrossLineEsc;
	return CPrPage::ValidateData();
}
